
/**
 * @brief    Defines a design region for topometry optimization
 * (element-by-element optimization).
 *
 * @version  0.1
 * @author   wuxingchuang
 * @date     2025.04.11
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Design/DesignBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct TOMVARData : public DesignBase {
  struct DISCRETEData {
    SG::DataStructure::Common::Id m_DVID = 0;  ///<
  };
  struct SYMPLANEData {
    SG::DataStructure::Common::Id m_CID = 0;    ///<
    SG::DataStructure::Common::I64 m_MS1 = 0;   ///<
    SG::DataStructure::Common::I64 m_MS2 = 0;   ///<
    SG::DataStructure::Common::I64 m_MS3 = 0;   ///<
    SG::DataStructure::Common::I64 m_CSM = 0;   ///<
    SG::DataStructure::Common::I64 m_NCSM = 0;  ///<
  };
  struct TOMVARIDData {
    SG::DataStructure::Common::Id m_TID = 0;     ///<
    SG::DataStructure::Common::Real m_C0 = 0.0;  ///<
    SG::DataStructure::Common::Real m_C1 = 0.0;  ///<
  };

  char m_PTYPE[8] = {0};                          ///<
  SG::DataStructure::Common::Id m_pId = 0;        ///<
  SG::DataStructure::Common::Id m_FID = 0;        ///<
  char m_PNAME[8] = {0};                          ///<
  SG::DataStructure::Common::Real m_XINIT = 0.0;  ///<
  SG::DataStructure::Common::Real m_XLB = 0.0;    ///<
  SG::DataStructure::Common::Real m_XUB = 0.0;    ///<
  SG::DataStructure::Common::Real m_DELXV = 0.0;  ///<
  SG::DataStructure::Common::Id m_domainId = 0;   ///<

  std::vector<DISCRETEData> m_DISCRETEList;
  std::vector<SYMPLANEData> m_SYMPLANEList;
  std::vector<TOMVARIDData> m_TOMVARIDList;
};

///@{ @brief operator override
DECLSPEC bool operator==(const TOMVARData::DISCRETEData& val1,
                         const TOMVARData::DISCRETEData& val2);
DECLSPEC bool operator==(const TOMVARData::SYMPLANEData& val1,
                         const TOMVARData::SYMPLANEData& val2);
DECLSPEC bool operator==(const TOMVARData::TOMVARIDData& val1,
                         const TOMVARData::TOMVARIDData& val2);

DECLSPEC bool operator==(const TOMVARData& val1, const TOMVARData& val2);
///}@
SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
